home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / news / readers / nn / nn6.4.patch18 < prev    next >
Encoding:
Internet Message Format  |  1993-04-20  |  11.8 KB

  1. From comp.sources.bugs Mon Sep 14 11:35:28 1992
  2. Xref: marlin.jcu.edu.au news.software.nn:3211 comp.sources.bugs:1909
  3. Path: marlin.jcu.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!uniwa!DIALix!zeus!not-for-mail
  4. From: peter@zeus.DIALix.oz.au (Peter Wemm)
  5. Newsgroups: news.software.nn,comp.sources.bugs
  6. Subject: nn 6.4 - Official patch #18
  7. Date: 13 Sep 1992 11:58:11 +0800
  8. Organization: Karam Pty. Ltd., Perth, Western Australia.
  9. Lines: 357
  10. Message-ID: <18ue8jINN2pf@zeus.dialix.oz.au>
  11. NNTP-Posting-Host: zeus.dialix.oz.au
  12. Summary: Fixes bugs in patch #16 (I hope)
  13. Keywords: nn patch
  14.  
  15.  
  16.          This is an official patch to nn release 6.4
  17.          -------------------------------------------
  18.  
  19.                   PATCH #18
  20.  
  21.                Priority: MEDUIM
  22.  
  23. NOTE: This patch has been posted before, you may have already installed it...
  24. If not, please be aware that future patches (official at least..) will assume
  25. that this has been installed.
  26.  
  27. NN 6.4.16 left a few annoying bugs in the menu selection code.  Many have been
  28. been suffering because of this, and many are missing out on the news features
  29. introduced in Patch #15 - in particular, "consolidated-menus". For those who
  30. are not familiar with these patches, it is a simplistic thread-like extension
  31. to the article viewer to allow collapsing of multiple articles on the same
  32. subject. It is not true threading, however (yet.. :-)
  33.  
  34. This patch, and the previous patch #17 were posted last year as unofficial
  35. patches which solve some of the more serious bugs.
  36.  
  37. After some discussions with interested parties, it was decided to re-post
  38. these as as "Official", and clean up a few of the remaining rough edges
  39. in a "Real Soon Now" patch #19.  As quite a few sites have already installed
  40. these patches, (and also many have not...) they were re-posted to help ease
  41. the transition.
  42.  
  43. The contents of this patch are exactly the same as the previous postings.
  44. Do not apply it again...  You do not need to remove the old one and
  45. re-apply.
  46.  
  47. It is reccomended that you install the PAIR of these (17,18) together.
  48. Please also verify that the new version (PL18) is stable on your machine
  49. before commiting to it.
  50.  
  51. cd to your source directory and type "patch < this_article".  Refuse any
  52. reversals...
  53.  
  54. This is the "go-ahead" mail I recieved from Kim:
  55. --------BEGIN--------
  56. ~Date: Fri, 4 Sep 92 08:39:21 GMT
  57. ~From: storm@olicom.dk (Kim F. Storm)
  58. Message-Id: <9209040839.AA05197@olicom.olicom.dk>
  59. To: Peter_Wemm@zeus.dialix.oz.au
  60. Cc: storm@olicom.dk
  61. ~Subject: Kim (that's me)
  62.  
  63. Peter,
  64.  
  65. I would appreciate if you took over the maintenance of nn 6.4.
  66. I have something for the group menu "almost ready" - but it has
  67. been in that state for the last year, and I have to dig into some
  68. old archive tapes to dig out the sources.  Let me see what I can do
  69. about it.
  70.  
  71. In the meantime, I would really appreciate if you would take
  72. on the task of collecting whatever unofficial fixes etc. there have
  73. been for nn 6.4.16 since its release, and put together a set of
  74. OFFICIAL patches ( I hereby grant you the right to stamp patches as
  75. official patches, provided you follow the current style ).
  76.  
  77. ++Kim
  78. ---------END---------
  79.  
  80. >Path: zeus!DIALix!uniwa!munnari.oz.au!samsung!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!cs.utexas.edu!utgpu!jupiter!morgan.ucs.mun.ca!garfield!larry
  81. >From: larry@garfield.cs.mun.ca (Larry Bouzane)
  82. >Newsgroups: news.software.nn
  83. >Subject: nn 6.4 - Unofficial patch 18
  84. >Message-ID: <1991Dec2.030450.8644@garfield.cs.mun.ca>
  85. >Date: 2 Dec 91 03:04:50 GMT
  86. >Organization: CS Dept., Memorial University of Newfoundland
  87. >Lines: 278
  88.  
  89. Here are a few more touch ups that I have installed in the version of
  90. NN that we run here.  These changes are all related to consolidated-menu
  91. mode within NN.  The following changes have been made:
  92.  
  93.     - possible core dump/strange behavior when using '=' command to
  94.       return to the menu from article reading mode.
  95.       (Reported by Olaf Schlueter [olaf@oski.toppoint.de])
  96.  
  97.     - articles marked as A_LEAVE_NEXT ('=') are not given any special
  98.       attention in consolidated menu mode.  I considered this incorrect
  99.       (I leave stuff around all the time :) and modified nn's behavior
  100.       to notice them.
  101.  
  102.     - unable to de-select an auto-selected subject when using
  103.       consolidated-menu mode.
  104.  
  105. I have decided to start updating the patchlevel.h file with this patch
  106. to keep things from getting too confusing.  If you want to add these
  107. changes, please apply the patch that I posted Nov 19, 1991 to an
  108. unmodified patchlevel 16 version before you apply this one.  If you
  109. missed that patch, you can get it via anonymous ftp from
  110. garfield.cs.mun.ca (134.153.1.1) in "/pub/news/nn6.4".  If you are
  111. unable to retrieve it via anonymous ftp, send me a note and I will mail
  112. it to you.
  113.  
  114. This patch includes the changes to patchlevel.h and ChangeLog that were not
  115. sent out with the previous patch.
  116.  
  117. Larry
  118.  
  119. *** /tmp/,RCSt1023579    Sun Dec  1 22:23:32 1991
  120. --- patchlevel.h    Sun Dec  1 22:23:35 1991
  121. ***************
  122. *** 27,33 ****
  123.    *    1991-03-22: Patch #14 (6.4.14) - MEDIUM
  124.    *    1991-04-02: Patch #15 (6.4.15) - LOW
  125.    *    1991-04-18: Patch #16 (6.4.16) - HIGH
  126.    */
  127.   
  128. ! #define PATCHLEVEL 16
  129.   
  130. --- 27,38 ----
  131.    *    1991-03-22: Patch #14 (6.4.14) - MEDIUM
  132.    *    1991-04-02: Patch #15 (6.4.15) - LOW
  133.    *    1991-04-18: Patch #16 (6.4.16) - HIGH
  134. +  *
  135. +  *    (Kim lost interest/dissapeared)
  136. +  *
  137. +  *    1991-11-19: Patch #17 (6.4.17) - MEDIUM
  138. +  *    1991-12-01: Patch #18 (6.4.18) - MEDIUM
  139.    */
  140.   
  141. ! #define PATCHLEVEL 18
  142.   
  143. *** /dev/null    Sun Dec  1 18:42:12 1991
  144. --- ChangeLog    Sun Dec  1 22:49:48 1991
  145. ***************
  146. *** 0 ****
  147. --- 1,26 ----
  148. + Unoffical Patch #17    (larry@garfield.cs.mun.ca Nov 19, 1991)
  149. +     - core dump due to selecting last_article+1 on screen
  150. +     - core dump due to consolidating (closing) last subject in a group
  151. +         under certain circumstances.
  152. +     - selecting consolidated articles with = command did not highlight
  153. +         the selected consolidated articles correctly.
  154. +     - fixed unconditional CLEAR TO END OF LINE that erased the next line on
  155. +         some terminals.
  156. + Unofficial Patch #18    (larry@garfield.cs.mun.ca;  Dec  1, 1991)
  157. +     - possible core dump/strange behavior when using '=' command to
  158. +       return to the menu from article reading mode.
  159. +       (Reported by Olaf Schlueter [olaf@oski.toppoint.de])
  160. +     - articles marked as A_LEAVE_NEXT ('=') are not given any special
  161. +       attention in consolidated menu mode.  I considered this incorrect
  162. +       (I leave stuff around all the time :) and modified nn's behavior
  163. +       to notice them.
  164. +     - unable to de-select an auto-selected subject when using
  165. +       consolidated-menu mode.
  166. *** /tmp/,RCSt1023579    Sun Dec  1 22:23:33 1991
  167. --- menu.c    Sun Dec  1 16:42:23 1991
  168. ***************
  169. *** 82,87 ****
  170. --- 82,88 ----
  171.       int mi_total;    /* total number of articles with this subject */
  172.       int mi_unread;    /* no of unread articles with this subject */
  173.       int mi_selected;    /* no of selected articles with this subject */
  174. +     int mi_left;    /* no of articles marked for later viewing */
  175.       int mi_art_id;    /* article id (for mark()) */
  176.   } menu_info[INTERVAL1+INTERVAL2];
  177.   
  178. ***************
  179. *** 138,146 ****
  180.       if (ah->flag & A_ROOT_ART)
  181.       return root;
  182.   
  183. -     if (ah->flag & A_CLOSED)    /* only root article is shown on menu */
  184. -     return firsta + menu_info[ah->menu_line].mi_cura;
  185.       while (root > 0) {
  186.       if (articles[root]->flag & A_ROOT_ART) break;
  187.       root--;
  188. --- 139,144 ----
  189. ***************
  190. *** 172,187 ****
  191.   {
  192.       register struct menu_info *mi;
  193.       register article_number n;
  194. !     int total, unread, selected, invisible;
  195.       
  196.       if (!(articles[art]->flag & A_CLOSED)) return art + 1;
  197.       
  198. !     total = unread = selected = 0;
  199.       n = art = root_article(art);
  200.   
  201.       while (n < n_articles) {
  202.       if (articles[n]->attr == 0) unread++;
  203.       else if (articles[n]->attr & A_SELECT) selected++; 
  204.       total++;
  205.       if (++n == n_articles) break;
  206.       if (articles[n]->flag & A_ROOT_ART) break;
  207. --- 170,186 ----
  208.   {
  209.       register struct menu_info *mi;
  210.       register article_number n;
  211. !     int total, unread, selected, left, invisible;
  212.       
  213.       if (!(articles[art]->flag & A_CLOSED)) return art + 1;
  214.       
  215. !     total = unread = selected = left = 0;
  216.       n = art = root_article(art);
  217.   
  218.       while (n < n_articles) {
  219.       if (articles[n]->attr == 0) unread++;
  220.       else if (articles[n]->attr & A_SELECT) selected++; 
  221. +     else if (articles[n]->attr == A_LEAVE_NEXT) left++;
  222.       total++;
  223.       if (++n == n_articles) break;
  224.       if (articles[n]->flag & A_ROOT_ART) break;
  225. ***************
  226. *** 192,197 ****
  227. --- 191,197 ----
  228.       mi->mi_total = total;
  229.       mi->mi_unread = unread;
  230.       mi->mi_selected = selected;
  231. +     mi->mi_left = left;
  232.       return n;
  233.   }
  234.   
  235. ***************
  236. *** 206,215 ****
  237.   register struct menu_info *mi;
  238.   char *cbuf;
  239.   {
  240. !     char sel[10], unr[10];
  241.       attr_type cattr;
  242.       
  243. !     if (mi->mi_unread == 0)
  244.       cattr = A_READ;
  245.       else if (mi->mi_total == mi->mi_selected)
  246.       cattr = A_SELECT;
  247. --- 206,217 ----
  248.   register struct menu_info *mi;
  249.   char *cbuf;
  250.   {
  251. !     char lft[10], sel[10], unr[10];
  252.       attr_type cattr;
  253.       
  254. !     if (mi->mi_total == mi->mi_left)
  255. !     cattr = A_LEAVE_NEXT;
  256. !     else if (mi->mi_unread == 0)
  257.       cattr = A_READ;
  258.       else if (mi->mi_total == mi->mi_selected)
  259.       cattr = A_SELECT;
  260. ***************
  261. *** 220,231 ****
  262.       else
  263.       cattr = 0;
  264.   
  265. !     sel[0] = unr[0] = NUL;
  266.       if (mi->mi_selected && mi->mi_selected < mi->mi_unread)
  267.       sprintf(sel, "%d/", mi->mi_selected);
  268.       if (mi->mi_unread && mi->mi_unread < mi->mi_total)
  269.       sprintf(unr, "%d:", mi->mi_unread);
  270. !     sprintf(cbuf, "%s%s%d", sel, unr, mi->mi_total);
  271.   
  272.       return cattr;
  273.   }
  274. --- 222,235 ----
  275.       else
  276.       cattr = 0;
  277.   
  278. !     lft[0] = sel[0] = unr[0] = NUL;
  279. !     if (mi->mi_left && mi->mi_left < mi->mi_unread)
  280. !     sprintf(lft, "%d,", mi->mi_left);
  281.       if (mi->mi_selected && mi->mi_selected < mi->mi_unread)
  282.       sprintf(sel, "%d/", mi->mi_selected);
  283.       if (mi->mi_unread && mi->mi_unread < mi->mi_total)
  284.       sprintf(unr, "%d:", mi->mi_unread);
  285. !     sprintf(cbuf, "%s%s%s%d", lft, sel, unr, mi->mi_total);
  286.   
  287.       return cattr;
  288.   }
  289. ***************
  290. *** 268,273 ****
  291. --- 272,278 ----
  292.       thread_counters(firsta + cura);
  293.       if (old.mi_total == mi->mi_total &&
  294.           old.mi_selected == mi->mi_selected &&
  295. +         old.mi_left == mi->mi_left &&
  296.           old.mi_unread == mi->mi_unread) return;
  297.   
  298.       cattr = closed_attr(mi, cbuf);
  299. ***************
  300. *** 619,626 ****
  301.   
  302.            case MC_MENU:
  303.           ah->attr = o_attr;
  304. !         if (nexta - firsta < n_articles)
  305. !             if ((firsta = cur - 5) < 0) firsta = 0;
  306.           next_cura = cur - firsta;
  307.   
  308.           return MC_MENU;
  309. --- 624,642 ----
  310.   
  311.            case MC_MENU:
  312.           ah->attr = o_attr;
  313. !         if (nexta - firsta < n_articles) {
  314. !             /* Keep a little article context by making the */
  315. !             /* current article go on menu line 6 if possible */
  316. !             if (IS_VISIBLE(articles[cur]))
  317. !                 firsta = cur;
  318. !             else
  319. !                 firsta = root_article(cur);
  320. !             for (next = 0; firsta > 0 && next < 5; next++) {
  321. !                 firsta--;
  322. !                 if (!IS_VISIBLE(articles[firsta]))
  323. !                     firsta = root_article(firsta);
  324. !             }
  325. !         }
  326.           next_cura = cur - firsta;
  327.   
  328.           return MC_MENU;
  329. ***************
  330. *** 819,826 ****
  331.   attr_type old, new;
  332.   int update;
  333.   {
  334. !     return repl_attr(root_article(firsta+cura), next_root_article(firsta+cura),
  335. !              old, new, update);
  336.   }
  337.   
  338.   static repl_attr_all(old, new, update)
  339. --- 835,847 ----
  340.   attr_type old, new;
  341.   int update;
  342.   {
  343. !     int    f, l;
  344. !     f = root_article(firsta+cura);
  345. !     l = next_root_article(firsta+cura);
  346. !     if (old == A_SELECT)
  347. !     (void) repl_attr(f, l, A_AUTO_SELECT, A_SELECT, update);
  348. !     return repl_attr(f, l, old, new, update);
  349.   }
  350.   
  351.   static repl_attr_all(old, new, update)
  352.  
  353. >--
  354. Larry Bouzane
  355. Department of Computer Science, Memorial University of Newfoundland, Canada
  356. larry@garfield.cs.mun.ca; uunet!garfield!larry
  357.  
  358. -- 
  359. Peter Wemm : peter@zeus.dialix.oz.au   If it's broke, fix it (The MS-DOS way)
  360. Work phone: +61-9-479-1855    If it aint broke, don't touch it (The Unix way)
  361. Fax: +61-9-479-1134   If we can't fix it, it ain't broke (Maintainer's Motto)
  362.  
  363.